<template>
  <div id='app'>
      <RouterTo :title="title"></RouterTo>

      <van-card
      v-for="(c,i) in list" :key="i"
  :num="c.kanjiaPrice"
  :price="c.userId"
  :desc="c.stores"
  :title="c.name"
  :thumb="c.pic"
  :origin-price="c.views"
  @click="detail(c)"
/>


  </div>
</template>

<script>
import RouterTo from '../../components/hedaerTO/routerTo'
export default {
  data () {
    return {
      list: [],
      title:'砍价列表'
    }
  },
  methods: {
      get(){
          this.$request.kanjialist().then(res=>{
        this.list=res.data.data.goodsMap
        console.log(res.data.data.goodsMap);
      })
      },
       detail(c){
        this.$router.push(
          {
            path:this.$routerConfig.detail.path,
            query:{
              id:c.id,
              pic:c.pic,
              name:c.name,
              characteristic:c.characteristic,
              minPrice:c.minPrice,
              }

          }
          
          
          
          )

    }


  },
  mounted() {
      this.get()

  },
  components: {
RouterTo
  }
}
</script>

<style lang='scss'>

</style>
